home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
TPUG - Toronto PET Users Group
/
TPUG Users Group CD
/
TPUG Users Group CD.iso
/
C64
/
T-TPUG Old Monthly Disks
/
(c)th.d64
/
bowling ledger.c
(
.txt
)
< prev
next >
Wrap
Commodore BASIC
|
2007-02-11
|
9KB
|
286 lines
20 ZZ$="*** CAT BOWL LEDGER ***"
22 POKE53281,0:POKE53280,13:PRINT"[147]"
34 PRINT" "
36 PRINT" CATALYTIC BOWLING LEAGUE LEDGER "
38 PRINT" "
40 PRINT"S E L E C T T R A N S A C T I O N"
42 PRINTSPC(169)"[213][192][192][178][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][201]"
44 FORX=1TO9:PRINTSPC(9)"[221][221]"SPC(16)"[221]":NEXT
46 PRINTSPC(9)"[202][192][192][177][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][203]"
48 POKE214,10:PRINT:PRINT"":FORX=1TO9:PRINTTAB(10)X:NEXT
50 POKE214,11:PRINT:PRINT""TAB(13)" BANK DEPOSIT ":PRINTTAB(13)" WRITE CHECKS "
52 PRINTTAB(13)" ADJUSTMENTS ":PRINTTAB(13)" LEDGER ENTERY "
54 PRINTTAB(13)" VIEW LEDGER ":PRINTTAB(13)" VIEW BALANCE "
56 PRINTTAB(13)"[158] QUIT ":PRINTTAB(13)" FORMAT DISK "
58 PRINTTAB(13)" CAN LAST ENTRY "
60 GETY$:IFY$<"1"ORY$>"9"THEN60
62 Y=VAL(Y$):GOSUB198:ONYGOTO182,214,230,244,256,408,442,462,534
64 PRINT"[147]"ZZ$
66 PRINTSPC(51)" "
68 PRINTSPC(11)HA$
70 PRINTSPC(11)" ":RETURN
72 PRINTSPC(88)"[155][213][192][192][192][201][157][157][157][157] [157][157][157][157][202][192][192][192][203]"
74 PRINTSPC(8)"[213][192][192][201][157][157][157] [157][157][157][202][192][192][203]"
76 PRINTSPC(8)"[213][192][192][192][192][192][192][201][157][157][157][157][157][157][157] [157][157][157][157][157][157][157][202][192][192][192][192][192][192][203]":IFPZ=1THENRETURN
78 PRINT"[192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192]"
80 PRINT"[192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192]":RETURN
82 INPUT"";MO$:MO$=LEFT$(MO$,3)
84 IFLEFT$(MO$,1)="\"THEN180
86 V=1:FORX=1TO12:READMV$:IFMO$=MV$THENV=0
88 DATAJAN,FEB,MAR,APR,MAY,JUN,JUL,AUG,SEP,OCT,NOV,DEC
90 NEXT:RESTORE:IFVTHENMO$="":GOSUB206:GOTO82
92 GOSUB198
94 INPUT"";DA$:IFLEFT$(DA$,1)="\"THEN180
96 DA=VAL(DA$):IFLEN(DA$)<>2ORDA<1ORDA>31THENDA$="":GOSUB206:GOTO94
98 GOSUB198
100 INPUT"";AM$:IFLEFT$(AM$,1)="\"THEN180
102 IFLEN(AM$)<3THENAM$="":GOSUB206:GOTO100
104 AV$=RIGHT$(AM$,3):IFLEFT$(AV$,1)<>"."THENAM$="":GOSUB206:GOTO100
106 GOSUB198
108 RETURN
110 POKE214,17:PRINT:PRINT"";
112 DE$=""
114 GETM$:IFM$=""THEN114
116 IFM$=CHR$(20)THENX1=1:GOTO124
118 IFLEN(DE$)>39THENX1=0:GOTO124
120 IFM$=CHR$(13)THENGOSUB198:GOTO132
122 PRINTM$;:DE$=DE$+M$:GOTO114
124 DE$="":FORX=0TO39:POKE1784+X,32:POKE56056+X,1:NEXTX:M$="":IFX1=1THEN110
126 POKE214,17:PRINT:PRINT"MAX DESCRIPTION LENGTH 40 CHARACTERS[144]":GOSUB206
128 FORI=1TO500:NEXT
130 FORX=0TO39:POKE1784+X,32:POKE56056+X,1:NEXTX:M$="":GOTO110
132 IFLEFT$(DE$,1)="\"THEN180
134 IFDE$=""THENDE$="*** NO DESCRIPTION ENTERED ***"
136 PRINT:PRINTSPC(47)"READY TO RECORD ? Y/N"
138 GETM$:IFM$=""THEN138
140 GOSUB198
142 IFM$="Y"THEN146
144 GOTO180
146 POKE214,23:PRINT:PRINTSPC(12)"[144] PLEASE WAIT [146]":RETURN
148 OPEN2,8,2,"0:ENC,S,R":INPUT#2,EN$:CLOSE2:RETURN
150 GOSUB174
152 EN=VAL(EN$):IFEN<110THEN160
154 PRINT"[147]"SPC(47)"<*> DATA DISK FULL [146]<*>"
156 PRINT"INSERT A NEW DISK FOR FORMATING"
158 FORI=1TO3000:NEXT:RUN
160 RETURN
162 OPEN3,8,3,"@0:BAL,S,W":PRINT#3,BA$:CLOSE3:RETURN
164 OB$="EN# "+EN$:OPEN4,8,4,"0:"+OB$+",S,W"
166 PRINT#4,CK$:PRINT#4,MO$:PRINT#4,DA$:PRINT#4,DE$:PRINT#4,BA$:PRINT#4,AM$
168 PRINT#4,LA$:CLOSE4:GOSUB170:GOTO180
170 EN=EN+1:EN$=STR$(EN):OPEN2,8,2,"@0:ENC,S,W":PRINT#2,EN$:CLOSE2:RETURN
172 OPEN4,8,4,"0:"+HE$+",S,R":INPUT#4,CK$,MO$,DA$,DE$,BA$,AM$,LA$:CLOSE4:RETURN
174 OPEN3,8,3,"0:BAL,S,R":INPUT#3,BA$:CLOSE3:RETURN
176 PRINT"[151]MONTH:":PRINT"DAY:":PRINT"AMOUNT:":PRINT"DESCRIPTION
178 BA[178][197](BA$):AM[178][197](AM$):LA[178][197](LA$):[142]
180 CK$[178]"":LA$[178]"":MO$[178]"":DE$[178]"":AM$[178]"":[137]20
182 [143]*******DEPOSIT*********
184 [151]53281,1:[151]53280,15
186 [153]"":HA$[178]" BANK DEPOSIT ":[141]64:[141]72
188 [141]176
190 [141]148:[141]150:[153]""[163]27)"ENTRY#STOP"EN
192 [141]82:[141]110
194 CK$[178]"DEP":LA$[178]"00.00"
196 [141]178:BA[178]BA[170]AM:BA$[178][196](BA):[141]162:[137]164
198 [143]*******BELL************
200 [151]54296,15:[151]54277,0:[151]54278,247
202 [151]54276,17:[151]54273,40:[151]54272,0
204 [129]X[178]1[164]100:[130]:[151]54276,16:[142]
206 [143]*******BUZZER**********
208 [151]54296,15:[151]54277,45:[151]54278,165
210 [151]54276,33:[151]54273,6:[151]54272,5
212 [129]X[178]1[164]200:[130]:[151]54276,32:[151]54273,0:[151]54272,0:[142]
214 [143]*******CHECK***********
216 [151]53281,1:[151]53280,15
218 [153]"OPEN":HA$[178]" CHECK ENTRY ":[141]64:[141]72:[141]176:[141]148:[141]150
220 [153]""[163]27)"OPENENTRY#STOP"EN
222 [153][166]94)"CHECK #ONLIST(null)TANTANTANRIGHT$CMDCMDCMDCMDCMDMID$TANTANTAN(null)STOP"
224 [133]"";CK$:[139][195](CK$)[177]3[167][141]206:[137]180
226 [141]198:[141]82:[141]110
228 LA$[178]"00.00":[141]178:BA[178]BA[171]AM:BA$[178][196](BA):[141]162:[137]164
230 [143]*******ADJUSTMENTS*****
232 [151]53281,1:[151]53280,15
234 [153]"DEF":HA$[178]" ADJUSTMENTS ":[141]64:[141]72:[141]176:[141]148:[141]150
236 [153]""[163]27)"DEFENTRY#STOP"EN
238 [153]"+OR-"
240 [141]198:[141]82:[141]110
242 LA$[178]"00.00":CK$[178]"ADJ":[141]178:BA[178]BA[170]AM:BA$[178][196](BA):[141]162:[137]164
244 [143]*******LEDGER**********
246 [151]53281,1:[151]53280,15
248 [153]"CONT":HA$[178]" LEDGER ENTRY ":[141]64:[141]72:[141]176:[141]148:[141]150
250 [153]""[163]27)"CONTENTRY#STOP"EN
252 [141]198:[141]82:[141]110
254 LA$[178]AM$:AM$[178]"00.00":CK$[178]"LED":[141]178:[141]162:[137]164
256 [143]*******VIEW LEDGER*****
258 [151]53280,15:[151]53281,1
260 [153]"":HA$[178]" VIEW LEDGER ":[141]64
262 [153]"":HA$[178]" PLEASE SELECT ":[141]66
264 [153][166]86)"POKE(null)TANRIGHT$"
266 [153][166]6)"(null)S(null)CREEN"
268 [153][166]6)"MID$TAN(null)"
270 [153][163]17)"- OR -"
272 [153][163]25)"(null)TANRIGHT$"
274 [153][163]25)"(null)P(null)RINTER"
276 [153][163]25)"MID$TAN(null)"
278 [161]M$:[139]M$[179][177]"S"[175]M$[179][177]"P"[167]278
280 [139]M$[178]"P"[167]360
282 [139]M$[178]"S"[167]286
284 [137]180
286 [153]"LOAD"[166]86)" "
288 [153][166]6)" SELECT FILE SEQUENCE MODE "
290 [153][166]6)" POKE"
292 [153][166]85)"(null)TANRIGHT$"
294 [153]"(null)A(null)LL"
296 [153]"MID$TAN(null)"
298 [153][163]15)"-OR-"
300 [153][163]20)"(null)TANRIGHT$"
302 [153][163]20)"(null)R(null)ECENT"
304 [153][163]20)"MID$TAN(null)"
306 [161]M$:[139]M$[178]""[167]306
308 [139]M$[178]"A"[167]314
310 [139]M$[178]"R"[167]342
312 [137]306
314 [151]53281,0:[151]53280,0:[153]"LOAD":EN[178]1:L$[178]"":[129]I[178]1[164]40:L$[178]L$[170]"USR":[130]
316 L$[178]L$[170]"ON":[141]148:LI[178][197](EN$)
318 HB$[178][196](EN):HE$[178]"EN#"[170]HB$:[141]172:[153]"ON";:[141]320:[137]328
320 [153]"ONENTRY#"EN
322 [153]"SYS"CK$:[153][163]4)"ONCLR"MO$:[153][163]7)"ONOPEN"DA$:[153][163]12)"ON$"BA$
324 [153][163]21)"ONDEF$"AM$:[153][163]30)"ON$"LA$
326 [153]""DE$;"":[153]L$:[142]
328 EN[178]EN[170]1:[139]EN[173]4[178][181](EN[173]4)[167]334
330 [153]"ONON":[139]EN[179]LI[167]318
332 [139]EN[177]LI[171]1[167][151]214,21:[153]:[153]" END OF RECORDS ":[137]334
334 [151]214,22:[153]:[153]" PRESS SPACE BAR "
336 [161]I$:[139]I$[178]""[167]336
338 [139]EN[177]LI[171]1[167]180
340 [153]"LOAD":[137]318
342 [151]53280,0:[151]53281,0
344 [153]"LOAD":[141]148:EN[178][197](EN$)[171]1
346 [153]"LOAD":HE$[178]"EN#"[170][196](EN):[141]172:[141]320
348 [153]"CONT PRESS RETURN TO SEE EARLIER ENTRY "
350 [153]"OPEN PRESS SPACEBAR TO RETURN TO MENU "
352 [161]I$:[139]I$[178]""[167]352
354 [139]I$[179][177][199](13)[167]180
356 EN[178]EN[171]1:[139]EN[179]1[167]180
358 [137]346
360 [143]*******PRINTER********
362 EN[178]0:Y[178]0:[141]148:LI[178][197](EN$)[171]1:V[178]0
364 [159]4,4:[157]4
366 [139]Y[167]384
368 [152]4,[199](14)" CATALYTIC BOWLING LEAGUE"
370 [152]4,[199](16)"19 FINANCIAL REPORT"
372 [152]4,[199](16)"251984 - 1985 "
374 [152]4,[199](15)
376 [152]4,[199](16)"64TRANSACTIONS"
378 [152]4,"CK# DATE DESCRIPTION: BALANCE";
380 [152]4,[199](16)"63BANK LEDGER"
382 [129]X[178]1[164]80:[152]4,".";:[130]:Y[178]1:[137]394
384 [152]4,CK$;:[152]4,[199](16)"05"MO$" "DA$" "DE$[199](16)"52$"BA$;
386 [139]CK$[179]"0"[176]CK$[177]"999"[167]392
388 [152]4,[199](18)[199](16)"63$"AM$[199](146)[199](16)"72$"LA$
390 [137]394
392 [152]4,[199](16)"63$"AM$[199](16)"72$"LA$
394 EN[178]EN[170]1
396 [139]EN[177]LI[167][141]400:[129]X[178]0[164]4:[152]4,[199](10):[130]:[160]4:[137]180
398 [160]4:HB$[178][196](EN):HE$[178]"EN#"[170]HB$:[141]172:V[178]V[170]1:[139]V[179]26[167]:[137]364
399 [159]4,4:[157]4:[141]400:[129]X[178]1[164]6:[152]4:[130]:Y[178]0:V[178]0:[160]4:[137]364
400 [129]X[178]1[164]80:[152]4,".";:[130]
402 [152]4
404 [152]4," DEP = DEPOSIT LED = LEDGER ADJ = ADJUSTMENTS"
406 [142]
408 [143]******BALANCE********
410 [151]53280,15:[151]53281,1
412 [151]53281,1:[153]"LOAD"[166]131)"READ BALANCE"
414 [153][166]11)"USRUSRUSRUSRUSRUSRUSRUSRUSRUSRUSRUSRUSR"
416 [153][166]210)"(null)TANTANTANTANTANTANTANTANTANTANTANTANTANRIGHT$"
418 [129]X[178]1[164]3:[153][166]10)"(null)"[166]13)"(null)":[130]
420 [153][166]10)"MID$TANTANTANTANTANTANTANTANTANTANTANTANTAN(null)"
422 [153]"ONONON"[166]11)"$"
424 [153][166]221)"PLEASE WAIT....."
426 [141]174
428 LH$[178][201](BA$,3)
430 [139][202](LH$,2,1)[179][177]"."[175][202](LH$,1,1)[179][177]"."[167]BA$[178]BA$[170]".00":[137]434
432 [139][202](LH$,2,1)[178]"."[167]BA$[178]BA$[170]"0"
434 [151]214,11:[153]:[153][166]13)BA$
436 [151]214,20:[153]:[153][166]7)"PRESS SPACEBAR TO CONTINUEWAIT "
438 [161]M$:[139]M$[178]""[167]438
440 [141]198:[137]180
442 [143]******QUIT*********
444 [153]"LOAD"[166]51)"*** CAUTION ***"
446 [153][166]243)"THIS ROUTINE WILL COLD START TO "
448 [153]"BASIC VIA SYS 64738:"
450 [153][166]54)"* * *LIST"
452 [153][166]85)"OPENDO YOU WISH TO PROCEED? Y/N"
454 [161]M$:[139]M$[178]""[167]454
456 [141]198:[139]M$[178]"Y"[167][158]64738
458 [137]180
460 [144]
462 [143]*******FORMATING*******
464 [151]53280,2:[151]53281,15:[153]""
466 HA$[178]"FORMAT NEW DISK":[141]64
468 [153]"STOPENTER DISK NAME"
470 [153]"(null)TANTANTANTANTANTANTANTANTANTANTANTANTANTANTANTANRIGHT$"
472 [153]"(null) (null)"
474 [153]"MID$TANTANTANTANTANTANTANTANTANTANTANTANTANTANTANTAN(null)"
476 [153]"ONON";:G[178]1:DN$[178]""
478 [161]G$:[139]G$[178]""[167]478
480 DN$[178]DN$[170]G$:G[178]G[170]1
482 [153]G$;:[139]G$[178][199](13)[167]488
484 [139]G[177]15[167]488
486 [137]478
488 [153]""[163]24)"ONONONID"
490 [153][163]23)"(null)TANTANRIGHT$":[153][163]23)"(null) (null)":[153][163]23)"MID$TANTAN(null)";
492 [153]"ONCMDCMDCMD";
494 G$[178]"":ID$[178]"":[129]G[178]0[164]1:[161]G$:ID$[178]DI$[170]G$:[153]G$;:[130]
496 [129]G[178]0[164]1
498 [161]G$:[139]G$[178]""[176]G$[178][199](13)[167]498
500 ID$[178]ID$[170]G$:[153]G$;:[130]:[153]
502 [153]" (null)TANTANTANTANTANTANTANTANTANTANTANTANTANTANTANTANTANTANTANTANTANTANTANTANTANTANTANTANTANTANTANTANTANRIGHT$"
504 [153]"(null) INSERT NEW DISK IN DRIVE! (null)"
506 [153]"(null) PRESS "[199](34)"*"[199](34)" WHEN READY(null)"
508 [153]"MID$TANTANTANTANTANTANTANTANTANTANTANTANTANTANTANTANTANTANTANTANTANTANTANTANTANTANTANTANTANTANTANTANTAN(null)
510 PRINT" ** PRESS SPACEBAR TO ABORT ROUTINE **"
512 GETM$:IFM$<>" "ANDM$<>CHR$(42)THEN512
514 IFM$=" "THEN514
516 PRINTSPC(53)"[144]PLEASE WAIT"
518 OPEN15,8,15,"N0:"+DN$+","+ID$:CLOSE15
520 OPEN9,8,9,"0:--1984/85 YEAR--,S,W":CLOSE9
522 SAVE"LEDGER",8
524 OPEN3,8,3,"0:BAL,S,W"
526 PRINT#3,"00.00":CLOSE3
528 OPEN2,8,2,"0:ENC,S,W"
530 PRINT#2,"1":CLOSE2
532 GOTO180
534 REM****CANCEL LAST ENTERY****
536 PRINT"[147]"SPC(51)"*** CAUTION ***"
538 PRINTSPC(243)"THIS ROUTINE WILL ERASE THE LAST"
540 PRINT"ENTERY ON YOUR DISK AND WILL RESET THE BALANCE TO WHAT IT";
542 PRINT" PRIOR TO THE LAST ENTERY."
544 PRINTSPC(54)"* * *[155]"
546 PRINTSPC(85)"[159]DO YOU WISH TO PROCEED? Y/N"
548 GETM$:IFM$=""THEN548
550 GOSUB198:IFM$="Y"THEN554
552 GOTO180
554 PRINTSPC(53)" PLEASE WAIT "
556 GOSUB148
558 EN=VAL(EN$)-2:EN$=STR$(EN)
560 IFEN<1THEN564
562 GOTO574
564 PRINT"[147]"SPC(203)"THERE IS NOT ENOUGH FILES TO USE"
566 PRINT"THIS ROUTINE. "
568 PRINTSPC(123)"PRESS SPACEBAR TO CONTINUE"
570 GETM$:IFM$=""THEN570
572 GOSUB198:GOTO180
574 HE$="EN#":HE$=HE$+EN$
576 OPEN4,8,4,"0:"+HE$+",S,R":FORI=0TO4:INPUT#4,BA$:NEXT:CLOSE4
578 GOSUB162
580 GOSUB170:HE$="EN#":HE$=HE$+EN$
582 OPEN15,8,15,"S0:"+HE$:CLOSE15
584 GOSUB198:GOTO180
1000 REM"
1002 [143]" DOUGLAS BRAUN
1003 REM" REDCLIFF ALTA
1004 [143]" OCT. 01 1984
1005 REM"
1006 [143]"